package service.OrderService._driver;

import static org.junit.Assert.assertNotNull;

import org.junit.BeforeClass;
import org.junit.Test;

import service.OrderService.CheckOrderService;
import service.OrderService._stub.CheckOrderService_stub;
import util.OrderType;
import util.UserType;

import java.rmi.RemoteException;

/**
 * 
 * @author insomnia
 * @version Oct 22,2016
 */

public class CheckOrderService_driver {
	
	 static CheckOrderService checkOrderService;
	    @BeforeClass
	    public static void before(){
			try {
				checkOrderService=new CheckOrderService_stub();
			} catch (RemoteException e) {
				e.printStackTrace();
			}
		}
	    
	    @Test
	    public void getOrderInfoTest() throws RemoteException{
	        assertNotNull(checkOrderService.getOrderInfo("root"));
	    }
	    @Test
	    public void getOrderList()throws RemoteException{
	        assertNotNull(checkOrderService.getOrderList("root",OrderType.AbnormalOrder).next());
	    }

}
